package cn.alpha.intell.rbtlib.share;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.List;

import cn.alpha.intell.rbtlib.R;
import cn.alpha.intell.rbtlib.utils.ScreenUtil;

/**
 * Created by zhangxiliang on 2016/11/9.
 * 分享成功后导航
 */
public class ShareNavigationDiaolog extends Dialog {


    View dialogView;

    TextView mChattinngBtn;
    TextView mBackBtn;


    private Context mContext;



    public ShareNavigationDiaolog(Context context) {
        super(context, R.style.alpha_dialog);
        this.mContext = context;

        dialogView = LayoutInflater.from(context).inflate(R.layout.dialog_share_success, null);

        mChattinngBtn=(TextView)dialogView.findViewById(R.id.btn_share_chat);
        mBackBtn=(TextView)dialogView.findViewById(R.id.btn_share_back);

        mBackBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ((Activity)mContext).finish();
            }
        });

        mChattinngBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               dismiss();
            }
        });
        setCanceledOnTouchOutside(true);
        setCancelable(true);
        setContentView(dialogView);
        getWindow().getAttributes().gravity= Gravity.CENTER_HORIZONTAL;
        getWindow().getAttributes().width= (int)ScreenUtil.dpToPx(mContext,560);
    }



}
